package com.yby.dome3;

/**
 *轿车类
 */

public class Car extends Vehicle {
    int loader;//承载人数

    public Car(String brand,String color,int loader){
        super(brand,color);
        this.loader = loader;
    }
    public void run(){
        System.out.println(brand+",颜色:"+color+",速度为："+speed+"，最大承载人数"+loader);
    }

    public static void main(String[] args) {
        Car car = new Car("Honda","red",2);
        car.setSpeed(56);
        car.getSpeed();
        car.run();
    }
}
